#pragma once


#include <opencv2/opencv.hpp>

using namespace cv;
 
/// <summary>
/// 颜色空间
/// </summary>
/// <param name="image"></param>
void  ColorSpace_Demo(Mat& image, std::string dirpath)
{
	Mat gray, hsv;

	cvtColor(image, hsv, COLOR_BGR2HSV);
	cvtColor(image, gray, COLOR_BGR2GRAY);
	imshow("HSV", hsv);
	imshow("GRAY", gray);
	imwrite(dirpath + "/hsv.png", hsv);
	imwrite(dirpath + "/gray.png", gray);
}
